from django.db import models
from application.account.models import newlife_users
from application.tinymce.models import HTMLField

# Create your models here.

class Article(models.Model):
    title = models.CharField(max_length=50)
    content = HTMLField()
    author = models.ForeignKey(newlife_users)
    time = models.DateField(blank=True, null=True)

    def __str__(self):
        return self.title

class Recorder(models.Model):
    ip = models.IPAddressField()
    os = models.TextField(max_length=200)

    def __str__(self):
        return self.ip
